import Http from "@/http"

export function pageApi(params:any) {
    return Http.post('otherUser/page', params)
}

export function saveApi(params:any) {
    return params.id ? Http.put('otherUser/update/' + params.id, params) : Http.post('otherUser/add', params)
}

export function deleteApi(id) {
    return Http.delete('otherUser/delete/' + id)
}

export function importUserApi(file:File) {
    const formData = new FormData()
    formData.append('file', file)
    return Http.post('otherUser/import', formData)
}


export function secrecySeeApi(id:number, field:string, password:string, ) {
    return Http.post("otherUser/secrecy/" + id, {password, field})
}